<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css"
	href="<c:url value="/css/themes/default/easyui.css"/>">
<link rel="stylesheet" type="text/css"
	href="<c:url value="/css/themes/icon.css"/>">
<script type="text/javascript" src="<c:url value="/js/jquery.min.js"/>"></script>
<script type="text/javascript"
	src="<c:url value="/js/jquery.easyui.min.js"/>"></script>
<script type="text/javascript"
	src="<c:url value="/js/easyui-lang-zh_CN.js"/>"></script>
<title>蒋路的电子处方页面</title>
</head>
<body >

 	<style type="text/css">
	 	body{
		 	padding:0px;
		 	margin:0px;
	 	}
		ul,li{
			padding: 0px;
			margin: 0px;
			list-style: none;
		}
		li{
			height:30px;
		}
		#electronicePrint_btn{			
			background-color:#d2e9ff;
			margin-top:-5px;
			margin-left:-10px;
			margin-right:-10px;			
			border:1px solid #acd6ff;		
		}
		.itemone{
			margin-left:0px;
			width:195px;
		}
		.itemtwo{			
			margin-left:0px;
			width:190px;
		}
		.itemBtntwo{
			height:28px;
			margin-left:15px;
			width:100px;
		}
		#electronicePrint_up,#electronicePrint_into,#electronicePrint_searching_btn{
			border:1px solid #95B8E7;
		}
		#Print_ffOne{	
			margin-top:0px;		
			margin-bottom:5px;	
			margin-left:20px;		
		}
		
		#electronicePrint_tt{			
			margin-top:8px;		
			
		}

		#Print_ffOne{
			border:1px solid #95B8E7;
			background-color:#E0ECFF;
			padding:0px;
			margin-bottom:5px;
			margin-top:5px;
			margin-left:0px;
			padding-top:9px;
			height:40px;
		}
	</style>
	<script type="text/javascript"> 
	
		function chkmaxsms(vobj1,vmax)   {  
			 var str=vobj1.value;  
			 var strlen=str.length;
			 var vv=vmax-strlen;
			if(strlen>vmax)   {  
			  $("#cc_show_dnameshu")
				.html("你已经输入了："+vmax+"个字，还可以输入0个字！");
			  $.messager.alert("提示", "您已经超出该文本的输入范围，系统将只截取有效范围内的字符！");
			  $("#cc_input_dname").val(vobj1.value=str.substr(0,vmax));
			}else{
				$("#cc_show_dnameshu")
				.html("你已经输入了："+strlen+"个字，还可以输入"+vv+"个字！");
				
			}
		} 

		//计算价格
		$.extend($.fn.validatebox.defaults.rules, {			
			jsprice: {
		        validator: function(value){
		        	var rowIndex=$('#elePrintPillParticulars_tab').datagrid('getRowIndex',$('#elePrintPillParticulars_tab').datagrid('getSelected'));
					var row = $('#elePrintPillParticulars_tab').datagrid('getData').rows[rowIndex];					
					var b=row.rPrice;
					var d=value*b;
					$("#xg_rPrice").textbox("setText",d);
					
		        },
		    }
	    });
	
		var datainfo;
		$.extend($.fn.validatebox.defaults.rules, {
		inputnum:{
		        validator: function(value){
		        	var num=$("#electronicePrint_price").textbox("getText");
		        	var resul=num*value;
		        	var price=$("#electronicePrint_money").textbox("setText",resul);	        	 		        	   
		        },
		    }
		});
		//新增行数据  
		function addRow(data){ 										
			$("#electronicePrint_price").textbox("setText",data[0].maiMoney);	
			datainfo=data;
		} 
	  	
		function Queryadc() {						
			var i=0;		
			var nember=$("#electronicePrint_nember").textbox("getText");
			var Resule=$("#electronicePrint_Resule").textbox("getText");
			var idic=$("#elePrint_ic").textbox("getText");
			if((nember!=null || nember!="")&&(Resule!=null ||Resule!="")){											 
				$("#elePrintPillParticulars_tab").datagrid('insertRow',{
					index:i,	
					row: {
						rNum:nember,	
						rGuige:datainfo[0].pharStockGuige,
						rName:datainfo[0].pharStockMedName,
						rPrice:datainfo[0].maiMoney,
						rRemark:"待付款",
						rResule:Resule,
						rIcid:idic			
					}						
				});						
				i++;
			}			
		}  
		
		$.extend($.fn.validatebox.defaults.rules, {
			elePrintIc: {
		        validator: function(value){
		        	var date = new Date();		
        			var y = date.getFullYear();  
        			var m = date.getMonth() + 1;  
        			m = m < 10 ? '0' + m : m;  
        			var d = date.getDate();  
        			d = d < 10 ? ('0' + d) : d;  
        			var needDate=y + '-' + m + '-' + d; 
        			$("#bgchargeDate").textbox("setText",needDate);
        			$.ajax({
                        type: "Post",
                        url: "to_icnumtoic",
		                data: {icnum:value},
                        success: function (data) {
                        	$("#elePrint_Name").textbox("setText",data.iName);
                        	$("#elePrint_Sex").textbox("setText",data.iSex);
                        	$.ajax({
                                type: "Post",
                                url: "to_findMaxelePritid",
                                data: {  },                           
                                success: function (data1) {
                                	$.ajax({
                                        type: "Post",
                                        url: "to_MaxelePritidToDate",
                                        data: {erId:data1},
                                        success: function (data) {                                       	
                                            var date3=new Date();                                          
								        	var oDate1 = new Date(data);  
								        	var oDate2 =new Date(date3);
								        	var date1y=oDate1.getFullYear();
								        	var date1m=oDate1.getMonth();
								        	var date1d=oDate1.getDate();
								        	var date2y=oDate2.getFullYear();
								        	var date2m=oDate2.getMonth();
								        	var date2d=oDate2.getDate();									        	
								        	if(date1y==date2y && date1m==date2m && date1d==date2d){
								        		$("#elePrint_num").textbox("setText",data1+1);								        		
								        	}else{
								        		$("#elePrint_num").textbox("setText",1);
								        	}
                                        }
                                    });
                                }
                            });
                        	
                        }
                    });
		        	
		        	
		        },
		    }
		});
		
		function printdiv(printpage) {
			var newstr = printpage;
			//获得当前页面body里面的内容
			var oldstr = document.body.innerHTML;
			//把打印的内容填充
			document.body.innerHTML = newstr;
			//打印
			window.print();
			//把body的内容还原
			document.body.innerHTML = oldstr;
			return false;
		}
		function printHtml(printpage) {
			var v = printpage;
			//获得当前页面body里面的内容
			var b = document.body.innerHtml;
			//把打印的内容填充
			document.body.innerHtml = v;
			//打印
			window.print();
			//把body的内容还原
			document.body.innerHtml = b;
			return false;
		}
		
		$(function(){ 	
			
			$('#elePrintTwo_tab').datagrid({ 				
			    url:'to_idToElectronicePrint?ierId='+$("#a_yhic").textbox("getText")  			    
			});  
			
			//添加或激活选项卡
			$(".nav_btn").linkbutton({
				onClick : function() {
					var title = $(this).attr("title");
					var url = $(this).attr("url");

					//判断该面板是否已打开
					if ($("#jl_wtt").tabs("exists", title)) {
						//已存在则激活
						$("#jl_wtt").tabs("select", title);
					} else {
						//不存在
						var config = {
							title : title,
							href : url,
							closable : true
						}
						$("#jl_wtt").tabs("add", config);
					}
				}
			});
			
			$("#xg_elePrint_meddin_cancel").linkbutton({
				onClick:function(){
					$('#elePrint_meddin_win').window("close");																											
				}											
			}) 
			
			$("#jl_advice_save").linkbutton({
				onClick:function(){										
					var text = document.getElementById('cc_input_dname').value;
					var kind=$("#xsyz_kind").textbox("getText");
					if(kind==null || kind==""){
						$.messager.alert("温馨提示","请选择医嘱类型");
					}else{
						var OkKing=(kind.substring(5,9));						
						$.ajax({
			                type: "Post",
			                url: "to_addJlDoctorAdvice",
			                data: {
			                	    daKind:OkKing,
			                		daAdvice:text 
			                	},			  
			                success: function (data) {			                	
			                	$.messager.alert("温馨提示", "医嘱添加成功");
			                	$.ajax({
			                        type: "Post",
			                        url: "to_findMaxDoctorAdvice",
			                        data: {  },		
			                        success: function (data) {
			                            alert("max:"+data);
			                            $("#c_ynYz").textbox("setText",data);
			                        }
			                    });			               	
			                	$("#xsyz_kind").textbox("setText","");
			                	$("#cc_input_dname").val(''); 
			                	
			                }
			            });
					}					
																														
				}											
			})
			$("#xsyz_cq").linkbutton({
				onClick:function(){										
					$("#xsyz_kind").textbox("setText","正在编写：长期医嘱")																														
				}											
			})
			$("#xsyz_ls").linkbutton({
				onClick:function(){										
					$("#xsyz_kind").textbox("setText","正在编写：临时医嘱")																												
				}											
			})
			
			$("#xg_elePrint_meddin_save").linkbutton({
				onClick:function(){
					var index=$("#xg_index").textbox("getText");
					$('#elePrintPillParticulars_tab').datagrid('updateRow',{
						index: index,
						row: {
							rName :$("#xg_rName").textbox("getText"),
							rNum : $("#xg_rNum").textbox("getText"),
							rPrice: $("#xg_rPrice").textbox("getText"),
							rResule:$("#xg_rResule").textbox("getText")
						}
					});
					$('#elePrint_meddin_win').window("close");																											
				}											
			})
			
			$("#easyui-infomind").linkbutton({
				onClick:function(){	
							var rowIndex=$('#elePrintPillParticulars_tab').datagrid('getRowIndex',$('#elePrintPillParticulars_tab').datagrid('getSelected'));
							var row = $('#elePrintPillParticulars_tab').datagrid('getData').rows[rowIndex];
							var rows = $("#elePrintPillParticulars_tab").datagrid("getSelections");
							if(rows.length == 1){
								$('#elePrint_meddin_win').window({'title': "编辑处方单"});
								$('#elePrint_meddin_win').window("open");					
								$("#xg_rName").textbox("setText",row.rName);
								$("#xg_rName").textbox("readonly");
								$("#xg_rNum").textbox("setText", row.rNum);
								$("#xg_rPrice").textbox("readonly");
								$("#xg_rResule").textbox("setText",row.rResule);
								$("#xg_index").textbox("setText",rowIndex);
								$("#xg_rPrice").textbox("setText",row.rPrice);																
							}else{
								$.messager.alert("提示", "只能选择一条记录，您目前选择了" + rows.length + "条!");
							}
							
						}			
			})
			
			$("#easyui-infoup").linkbutton({	
				onClick:function(){
					var YNinfoup=$("#c_ynYz").textbox("getText");
					if(YNinfoup==null || YNinfoup==""){
						$.messager.confirm("确认", "你还没有给病人写医嘱是否放弃", function (f) {  
							 if (f) {						
								 $.ajax({
						                type: "Post",
						                url: "to_findMaxelePritid",
						                data: {  },
						                success: function (data) {
						                	var dataid=data+1;
						                	var data=$("#elePrintPillParticulars_tab").datagrid('getData');
											var totalnum=data.total;
											var index=data.total-1;					
											for(var i=0 ;i<=index ;i++){
												var row = $("#elePrintPillParticulars_tab").datagrid('getData').rows[i];
												$.ajax({
									                type:"Post",
									                url: "to_addJlRecipe",
									                data: {
									                	rGuige:row.rGuige,
									                	rName:row.rName,
									                	rNum:row.rNum,
									                	rPrice:row.rPrice,
									                	rRemark:row.rRemark,
									                	rResule:row.rResule,
														rIcid:row.rIcid,
														epid:dataid
									                },
									                success: function (data) {
									                	var date = new Date();		
									        			var y = date.getFullYear();  
									        			var m = date.getMonth() + 1;  
									        			m = m < 10 ? '0' + m : m;  
									        			var d = date.getDate();  
									        			d = d < 10 ? ('0' + d) : d;  
									        			var needDate=y + '-' + m + '-' + d; 
									                	$.ajax({
									                        type: "Post",
									                        url: "to_addJlElectronicePrint",
									                        data: { 					                        		
									                        		erOpenTime:needDate,
									                        		ierId:$("#elePrint_ic").textbox("getText"), 
									                        		adviceId: $("#c_ynYz").textbox("getText"),
									                        		rerId:1,
									                        		erPhysician:$("#elePrint_doctor").textbox("getText"),
									                        		inpectionResult:"完成",
									                        		state : "未取药"
									                        	   },				
									                        success: function (data) {
									                        	$.ajax({
									                                type: "Post",
									                                url: "to_addJlRecipe2",
									                                data: {
										                                	   irpId:$("#elePrint_ic").textbox("getText"), 
										                                	   rpDate:needDate,
										                                	   rpFigurePerson :$("#elePrint_doctor").textbox("getText"),
										                                	   rpNum :120
										                                	   
									                                	  },					
									                                success: function (data) {
									                                }
									                            });
									                        	$.messager.alert("温馨提示", "开药成功！等待付款！");
											                	$('#elePrintPillParticulars_tab').datagrid('loadData',{total:0,rows:[]});
							                                
									                        }
									                    });
									                	
									                }
									            });
											}		
						                }
						            });		
							 }else{
								 $.messager.alert("温馨提示", "已经取消");
							 }
						});				
					}else{
						 $.ajax({
				                type: "Post",
				                url: "to_findMaxelePritid",
				                data: {  },
				                success: function (data) {
				                	var dataid=data+1;
				                	var data=$("#elePrintPillParticulars_tab").datagrid('getData');
									var totalnum=data.total;
									var index=data.total-1;					
									for(var i=0 ;i<=index ;i++){
										var row = $("#elePrintPillParticulars_tab").datagrid('getData').rows[i];
										$.ajax({
							                type:"Post",
							                url: "to_addJlRecipe",
							                data: {
							                	rGuige:row.rGuige,
							                	rName:row.rName,
							                	rNum:row.rNum,
							                	rPrice:row.rPrice,
							                	rRemark:row.rRemark,
							                	rResule:row.rResule,
												rIcid:row.rIcid,
												epid:dataid
							                },
							                success: function (data) {
							                	var date = new Date();		
							        			var y = date.getFullYear();  
							        			var m = date.getMonth() + 1;  
							        			m = m < 10 ? '0' + m : m;  
							        			var d = date.getDate();  
							        			d = d < 10 ? ('0' + d) : d;  
							        			var needDate=y + '-' + m + '-' + d; 
							                	$.ajax({
							                        type: "Post",
							                        url: "to_addJlElectronicePrint",
							                        data: { 					                        		
							                        		erOpenTime:needDate,
							                        		ierId:$("#elePrint_ic").textbox("getText"), 
							                        		adviceId: $("#c_ynYz").textbox("getText"),
							                        		rerId:1,
							                        		erPhysician:$("#elePrint_doctor").textbox("getText"),
							                        		inpectionResult:"完成",
							                        		state : "未取药"
							                        	   },				
							                        success: function (data) {
							                        	$.ajax({
							                                type: "Post",
							                                url: "to_addJlRecipe2",
							                                data: {
								                                	   irpId:$("#elePrint_ic").textbox("getText"), 
								                                	   rpDate:needDate,
								                                	   rpFigurePerson :$("#elePrint_doctor").textbox("getText"),
								                                	   rpNum :120
								                                	   
							                                	  },					
							                                success: function (data) {
							                                    
							                                }
							                            });
							                        }
							                    });
							                	
							                	$.messager.alert("温馨提示", "开药成功！等待付款！");
							                	$('#elePrintPillParticulars_tab').datagrid('loadData',{total:0,rows:[]});
							                }
							            });
									}		
				                }
				            });
					}                            
				}
			}); 	
			$("#electronicePrint_btn1 ").linkbutton({onClick: function(){
				
				var date = new Date()		
    			var y = date.getFullYear() 
    			var m = date.getMonth() + 1  
    			m = m < 10 ? '0' + m : m  
    			var d = date.getDate() 
    			d = d < 10 ? ('0' + d) : d 
    			var needDate=y + '-' + m + '-' + d   
    			//alert(needDate)
    			$("#bgchargeDate123").textbox("setText",needDate);
    			
				var a_yhic=$("#a_yhic").textbox("getText")
				var b_ygid=$("#b_ygid").textbox("getText")
				var c_kcid=$("#c_kcid").textbox("getText")
				$("#elePrint_ic").textbox("setText",a_yhic)
				$.ajax({
	                type: "Post",
	                url: "to_idToTbstaff",
	                data: {staffNo:b_ygid },
	                success: function (data) {
	                    $("#elePrint_doctor").textbox("setText",data[0].staffName)
	                    $.ajax({
	    	                type: "Post",
	    	                url: "to_idTofindALLdepartment",
	    	                data: {bmid:c_kcid },
	    	                success: function (data) {
	    	                    $("#elePrint_offer").textbox("setText",data[0].departmentName)
	    	                }
	    	            });
	                }
	            });
			}});
			
			$("#easyui-infodown").linkbutton({onClick: function(){
				var rows = $("#elePrintPillParticulars_tab").datagrid("getSelections");
				  if(rows.length>0){
					 $.messager.confirm("提示", "确定要删除此处方吗？", function(v){
						if(v){										
							  var rows =$('#elePrintPillParticulars_tab').datagrid('getSelections');
							  for(var i = 0; i < rows.length; i ++){							    	
								    var rowIndex=$('#elePrintPillParticulars_tab').datagrid('getRowIndex',rows[i]);
								    $('#elePrintPillParticulars_tab').datagrid('deleteRow', rowIndex);							
							 }								    								   						
						}
					});
					
				  }
			      else{$.messager.alert("提示", "请选择需要删除的记录！"); }
			}});
			
			$("#electronicePrint_searching_btn").linkbutton({
				onClick:function(){
					var searchingPrice=$("#electronicePrint_searching").textbox("getText");
					if(searchingPrice==null ||searchingPrice==""){
						$('#w').window('open')
					}else{
						$('#seeSearchPillNKindWin').window({'title': "药品详情"});
						$("#seeSearchPillNKindWin").window('open');
						$('#seeSearchPillNKindWin').panel({href:"toJl_PharStockByKind?pharStockMedKind="+searchingPrice});
					}
				}
			});
			
			$("#electronicePrint_pill").textbox({
				onClickButton:function(){
					var pillprice=$("#electronicePrint_pill").textbox("getText");
					if(pillprice==null || pillprice==""){
						$.messager.alert("温馨提示","如果需要快速查找请在文本中输入药品简称");
					}else{						                 
			                $('#seeSearchPillWin').window({'title': "药品详情"});
							$("#seeSearchPillWin").window('open');
							$('#seeSearchPillWin').panel({href:"toJl_PharStock?pid="+pillprice});													                	           
					}
				}
			});			
			
		}); 
		
		$("#electronicePrint_up").linkbutton({onClick: function(){
			
			
		}});
		
		$("#electronicePrint_into").linkbutton({onClick: function(){
			
			
		}});
		
	</script>
		<div style="display:none"><input id="adc" class="easyui-textbox"></div>
    	<div id="electronicePrint_btn" style="overflow: auto;">										 	         
	    	<form id="electronicePrintff" action="" method="post">
	    			<div style="float:left;border:1px solid #95B8E7;margin-left:15px;margin-top:17px;margin-right:15px;border-top-left-radius:5px;border-top-right-radius:5px;border-bottom-right-radius:5px; border-bottom-left-radius:5px;">
							<a id="electronicePrint_btn1" style="width:100px;" class="easyui-linkbutton"
									data-options="iconCls:'icon-add',plain:true">详情
							</a>
					</div> 
					<div style="float:left">
					<table>
						<tr>																		
							<td>
								<div class="itemone">
									<input id="elePrint_ic"  class="easyui-textbox" data-options="label: '卡号:', width: 195,labelWidth:45,validType: ['elePrintIc']">
								</div>
							</td>
							<td>
								<div class="itemone">
									<input id="elePrint_Name"   class="easyui-textbox" data-options="label: '姓名:', width: 195,labelWidth:45">
								</div>
							</td>
							<td>
								<div class="itemone">
									<input id="elePrint_Sex"   class="easyui-textbox" data-options="label: '性别:', width: 195,labelWidth:45">
								</div>
							</td>
									
						</tr>						
						<tr>
			
							<td>
								<div class="itemone">
									<input id="elePrint_offer"   class="easyui-textbox" data-options="label: '科室:', width: 195,labelWidth:45">
								</div>
							</td>
							<td>
								<div class="itemone">
									<input id="elePrint_doctor"   class="easyui-textbox" data-options="label: '医师:', width: 195,labelWidth:45">
								</div>
							</td>
							<td>
								<div class="itemone">
									<input id="bgchargeDate123"   class="easyui-textbox" data-options="label: '日期:', width: 195,labelWidth:45">
								</div>
							</td>						
						</tr>
					</table>
					</div>	
			 </form>
			 </div>
			 <div id="electronicePrint_tt" class="easyui-tabs" style="width:100%;height:361px;">   
				    <div  id="sss" title="开药" style="display:none;"> 
				   		<div id="Print_ffOne"> 				   			      		
					    	<form id="electronicePrint_ff" action="" method="post">				    	
					    		<table>
										<tr>
											<td>
												<div class="itemtwo">
													<input id="electronicePrint_pill"  class="easyui-textbox" data-options="buttonText:'速查',label: '药品:', width: 190,labelWidth:45">
												</div>
											</td>
											<td>
												<div class="itemtwo">
													<input id="electronicePrint_searching"   class="easyui-textbox" data-options=" prompt:'类别查找...',width: 135">
													<a id="electronicePrint_searching_btn" class="easyui-linkbutton",
														data-options="plain:true,width:40">检索</a> 
												</div>
											</td>
											<td>
												<div class="itemBtntwo">
													<a id="electronicePrint_up" class="easyui-linkbutton",
														data-options="iconCls:'icon-add',plain:true,width:90">删除记录</a> 
												</div>
											</td>
											<td>
												<div class="itemBtntwo">
													<a id="electronicePrint_into" class="easyui-linkbutton"
														data-options="iconCls:'icon-add',plain:true,width:90">记录详情</a> 
												</div>
											</td>		
										</tr>														
									</table>				    				    		 								
								</form>	
						</div>
					
						<table id="elePrintTwo_tab" class="easyui-datagrid"				    		 		
									data-options="
									fitColumns:true,
									height:267,								
								    url:'',
									border:true,
									pagination:true,				
									pageSize: 6,
									pageList:[6,12,18,24]
								">
									<thead>
										<tr>
											<th class="ident" data-options="field:'erId',checkbox:true">编号</th>
											<th class="ident" data-options="field:'erPhysician',width:10">医师</th>
											<th class="ident" data-options="field:'checkNy',width:15,">是否检查</th>
											<th class="ident" data-options="field:'ierId'">卡号</th>									
											<th class="ident" data-options="field:'erOpenTime',width:10,formatter:function(value){
						                          var unixTimestamp = new Date(value);  
						                          return unixTimestamp.toLocaleDateString();}">处方日期
						                    </th> 
											<th class="ident" data-options="field:'state'">状态</th>						                    
										</tr>
									</thead>
					</table>
															   												    		
				    </div>					    				 				      
				    <div title="医嘱" data-options="closable:true" style="overflow:auto;padding:20px;display:none;">
				    		<div style="margin-bottom:10px;height:35px;">
				    			<a id="xsyz_ls" class="easyui-linkbutton",data-options="iconCls:'icon-ok',plain:true,width:90">临时医嘱</a>	
				    			<a id="xsyz_cq" class="easyui-linkbutton",data-options="iconCls:'icon-ok',plain:true,width:90">长期医嘱</a>
				    			<input id="xsyz_kind" name="xsyz_kind" class="easyui-textbox"data-options="prompt: '当前正在编写:',readonly:true, width: 200">		 
				    		</div>  
				       		<div style="margin-left:23px;padding: 0px">								
								<textarea id="cc_input_dname" name="adName" style="height:200px;
									width:86%;margin-left:3px;
									border-top-right-radius:5px;
									border-top-left-radius:5px;
									border-bottom-right-radius:5px;
									border-bottom-left-radius:5px;"
								 onkeyup="javascript:chkmaxsms(this,'999')"></textarea>
								<a id="jl_advice_save"  style="margin-bottom:10px"  class="easyui-linkbutton" data-options="iconCls:'icon-ok',plain:true">提交医嘱</a>
							</div>
							<div id="cc_show_dnameshu" style="margin-left:363px;margin-top: 0px;padding: 0px;color:#666666;position:relative; bottom:10px;">
								你已经输入了：0个字，还可以输入999个字！
							</div>
				    </div> 
				    <div title="开药详情" data-options="closable:true" style="overflow:auto;display:none;">  
				    		<div class="item"style="margin-bottom:8px;margin-top:8px;">
									<a id="easyui-infoup" class="easyui-linkbutton">批量提交</a>
									<a id="easyui-infomind" class="easyui-linkbutton">修改</a>	
									<a id="easyui-infodown" class="easyui-linkbutton">删除</a>			
							</div>									
				       		<table id="elePrintPillParticulars_tab" class="easyui-datagrid"				    		 		
										data-options="
										fitColumns:true,
										height:286,											
										url:'',
										border:true,
										pagination:true,				
										pageSize: 6,  
										pageList:[6,12,18,24]
										">
										<thead>
											<tr>
												<th class="ident" data-options="field:'rId',width:5,checkbox:true">编号</th>
												<th class="ident" data-options="field:'rIcid',width:10">卡号</th>													
												<th class="ident" data-options="field:'rGuige',width:10">规格</th>
												<th class="ident" data-options="field:'rName',width:15,editor:'textbox'">药品</th>
												<th class="ident" data-options="field:'rNum',width:10">数量</th>	
												<th class="ident" data-options="field:'rPrice',width:10">单价</th>									
												<th class="ident" data-options="field:'rRemark',width:8">状态</th>				
												<th class="ident" data-options="field:'rResule',width:10">备注</th>													
											</tr>
										</thead>
							 </table>						      		  
				    </div>  				     
			 </div> 			   
	     	 <div id="seeSearchPillWin" class="easyui-window" style="padding: 10px; line-height: 150%;" data-options="
					width: 800,
					height: 500,
					href:'toJl_PharStock',
					closed: true,
					tools:[{
					iconCls:'icon-add',
						handler:function(){
							alert('这个按钮好看一些');
							
						}
				    }]
					
			 ">			
			 </div>
			  <div id="seeSearchPillYKindWin" class="easyui-window" style="padding: 10px; line-height: 150%;" data-options="
					width: 800,
					height: 500,
					href:'toJl_PharStock',
					closed: true
			 ">			
			 </div>
			 <div id="seeSearchPillNKindWin" class="easyui-window" style="padding: 10px; line-height: 150%;" data-options="
					width: 800,
					height: 500,
					href:'toJl_PharStock',
					closed: true
			 ">			
			 </div>	
			 	
			<div id="w" class="easyui-window" closed="true" title="欢迎进入门急症药库" data-options="iconCls:'icon-save'" style="width:870px;height:490px;padding:5px;">
					<div class="easyui-layout" data-options="fit:true">
							
							<div data-options="region:'west',title:'门急症药房管理系统',split:true"
								style="width: 200px;">
								<div id="aa" class="easyui-accordion" data-options="fit:true">																						
									<div data-options="iconCls:'icon-menzheng'" title="经典分类" style="overflow: auto">
										<ul>
											<li><a class="easyui-linkbutton nav_btn" url="to_Jl_search_pill?pharStockMedKind='消炎药'" data-options="plain:true,iconCls:'icon-Icguanli',fit:true" title="中药">中药</a></li>
											<li><a class="easyui-linkbutton nav_btn" url="to_Jl_search_pill?pharStockMedKind='西药'" data-options="plain:true,iconCls:'icon-bingli',fit:true" title="西药">西药</a></li>	
											<li><a class="easyui-linkbutton nav_btn" url="to_Jl_search_pill?pharStockMedKind='注射剂'" data-options="plain:true,iconCls:'icon-Icguanli',fit:true" title="注射剂">注射剂</a></li>
											<li><a class="easyui-linkbutton nav_btn" url="to_Jl_search_pill?pharStockMedKind='外用药'" data-options="plain:true,iconCls:'icon-bingli',fit:true" title="外用药">外用药</a></li>																					
										</ul>
									</div>
									<div data-options="iconCls:'icon-menzheng'" title="功能主治分类" style="overflow: auto">										
											<li><a class="easyui-linkbutton nav_btn" url="to_Jl_search_pill?pharStockMedKind='消炎药'" data-options="plain:true,iconCls:'icon-Icguanli',fit:true" title="抗菌消炎类">抗菌消炎类</a></li>
											<li><a class="easyui-linkbutton nav_btn" url="to_Jl_search_pill?pharStockMedKind='肝胆胰类'" data-options="plain:true,iconCls:'icon-bingli',fit:true" title="肝胆胰类">肝胆胰类</a></li>																																															
											<li><a class="easyui-linkbutton nav_btn" url="to_Jl_search_pill?pharStockMedKind='消化系统类'" data-options="plain:true,iconCls:'icon-Icguanli',fit:true" title="消化系统类">消化系统类</a></li>
											<li><a class="easyui-linkbutton nav_btn" url="to_Jl_search_pill?pharStockMedKind='呼吸系统类'" data-options="plain:true,iconCls:'icon-bingli',fit:true" title="呼吸系统类">呼吸系统类</a></li>
											<li><a class="easyui-linkbutton nav_btn" url="to_Jl_search_pill?pharStockMedKind='耳鼻喉类'" data-options="plain:true,iconCls:'icon-guahao',fit:true" title="耳鼻喉类">耳鼻喉类</a></li>
											<li><a class="easyui-linkbutton nav_btn" url="to_Jl_search_pill?pharStockMedKind='抗过敏类'" data-options="plain:true,iconCls:'icon-jiuzheng',fit:true" title="抗过敏类">抗过敏类</a></li>
											<li><a class="easyui-linkbutton nav_btn" url="to_Jl_search_pill?pharStockMedKind='抗寄生虫类'" data-options="plain:true,iconCls:'icon-shoufei',fit:true" title="抗寄生虫类">抗寄生虫类</a></li>
											<li><a class="easyui-linkbutton nav_btn" url="to_Jl_search_pill?pharStockMedKind='抗结核及麻风类'" data-options="plain:true,iconCls:'icon-jiancha',fit:true" title="抗结核及麻风类">抗结核及麻风类</a></li>												
											<li><a class="easyui-linkbutton nav_btn" url="to_Jl_search_pill?pharStockMedKind='神经系统类'" data-options="plain:true,iconCls:'icon-bingli',fit:true" title="神经系统类">神经系统类</a></li>
											<li><a class="easyui-linkbutton nav_btn" url="to_Jl_search_pill?pharStockMedKind='维生素及营养类'" data-options="plain:true,iconCls:'icon-guahao',fit:true" title="维生素及营养类">维生素及营养类</a></li>
											<li><a class="easyui-linkbutton nav_btn" url="to_Jl_search_pill?pharStockMedKind='心脑血管类'" data-options="plain:true,iconCls:'icon-jiuzheng',fit:true" title="心脑血管类">心脑血管类</a></li>
											<li><a class="easyui-linkbutton nav_btn" url="to_Jl_search_pill?pharStockMedKind='血液疾病类'" data-options="plain:true,iconCls:'icon-shoufei',fit:true" title="血液疾病类">血液疾病类</a></li>
											<li><a class="easyui-linkbutton nav_btn" url="to_Jl_search_pill?pharStockMedKind='泌尿系统类'" data-options="plain:true,iconCls:'icon-jiancha',fit:true" title="泌尿系统类">泌尿系统类</a></li>			
										</ul>
									</div>																												
								</div>
							</div>
												
							<div data-options="region:'center'"
								style="padding: 5px; background: #eee;">
								<div id="jl_wtt" class="easyui-tabs" data-options="fit:true">
									<div title="门急症药库主界面" style="padding: 0px; display: none;">
										<h1>欢迎使用门急症药库管理系统</h1>
									</div>
								</div>
							</div>														
					</div>
			</div>
			 
			 
			 
			 <div id="elePrint_meddin_win" class="easyui-window"style="padding: 10px;line-height: 150%;"data-options="
		     		width: 400,
		     		height: 200,
		     		closed: true
			">			
					<div class="item" style="display:none">
						<input id="xg_index" name="xg_index" class="easyui-textbox"
							data-options="label: '索引:', width: 200">
					</div>		
					<div class="item">
						<input id="xg_rName" name="xg_rName" class="easyui-textbox"
							data-options="label: '药品:', width: 200">
					</div>
					<div class="item">
						<input id="xg_rNum" name="xg_rNum" class="easyui-textbox"
							data-options="validType: ['jsprice'],label: '数量:', width: 200">
					</div>				
					<div class="item">
						<input id="xg_rPrice" name="xg_rPrice" class="easyui-textbox"
							data-options="label: '金额:', width: 200">
					</div>					
					<div class="item">
						<input id="xg_rResule" name="xg_rResule" class="easyui-textbox"
							data-options="label: '备注:', width: 300">
					</div>									
					<div>
						<a id="xg_elePrint_meddin_save" class="easyui-linkbutton"data-options="iconCls:'icon-icOk'"style="width:90px">确定</a>
						 <a id="xg_elePrint_meddin_cancel" class="easyui-linkbutton"data-options="iconCls:'icon-icNo'"style="width:90px;">取消</a>
					</div>		
		</div>
</body>
</html>